package org.ttitfly.ttcore.web.account;

import java.util.List;

import javax.annotation.Resource;

import org.ttitfly.ttcore.entity.account.Role;
import org.ttitfly.ttcore.service.account.RoleManager;
import org.ttitfly.ttcore.so.account.RoleSO;
import org.ttitfly.ttcore.util.query.PageList;

public class RolePageList extends PageList<RoleSO>  {

	@Resource
	private RoleManager roleManager;
	
	public RolePageList(RoleSO so, RoleManager roleManager) {
	      super(so);
	      this.roleManager = roleManager;
	}

	@Override
    protected int getObjectCount() {
        return roleManager.getSORoleViewCount(so);
    }

    @Override
    protected List<Role> getObjectList() {
        return roleManager.getSORoleView(so);
    }

	public RoleManager getRoleManager() {
		return roleManager;
	}

	public void setRoleManager(RoleManager roleManager) {
		this.roleManager = roleManager;
	}
    
	
}
